<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	<h:body>
		<ui:composition>
			<c:if test="${empty showPhone}">
				<c:set var="showPhone" value="true"/>
			</c:if>
			
			<c:if test="${empty showEmail}">
				<c:set var="showEmail" value="true"/>
			</c:if>
	
			<h:panelGrid columns="2">
			
				<h:outputLabel style="font-weight:bold" value="#{msg.username}" />
	     		<h:outputLabel value="#{user.username}"/>
			
	     		<h:outputLabel style="font-weight:bold" value="#{msg.first_name}" />
	     		<h:outputLabel value="#{user.firstName}"/>
	     		
	     		<h:outputLabel style="font-weight:bold" value="#{msg.last_name}" />  
			    <h:outputLabel value="#{user.lastName}" />
	     			    
			    <h:outputLabel style="font-weight:bold" value="#{msg.documentType}" />
			    <h:outputLabel value="#{manageBean.obtainDescription(user.documentType.description)}"/>
	            
	     		<h:outputLabel style="font-weight:bold" value="#{msg.documentNum}" />
			    <h:outputLabel value="#{user.dni}"/>	
			    	
			    <h:outputText style="font-weight:bold"  value="#{msg.blockMotive}" rendered="#{user.block}"/>
				<h:outputText value="#{user.blockMotive}" rendered="#{user.block}"/>
				        	    
	
			</h:panelGrid>
			
			<p:dataTable var="role" value="#{user.activeRoles}" style="padding-top:15px;width:100%" rendered="#{showRoles}" emptyMessage="#{msg.noRecordsFound}">
	        		
        		<p:column headerText="#{msg.role}" style="width:30%">  
	            	<h:outputText value="#{manageBean.obtainDescription(role.description)}" />   
        		</p:column>		        		
			 </p:dataTable>			
			
			<p:dataTable var="mail" value="#{user.activeUserEmail}"
									style="padding-top:15px;width:100%" rendered="#{showEmail}" emptyMessage="#{msg.noRecordsFound}">  
	  
		        <p:column headerText="#{msg.email}" style="width:30%">  
	            	<h:outputText value="#{mail.email}" />   
        		</p:column> 
        		
        		<p:column headerText="#{msg.emailType}" style="width:30%">  
	            	<h:outputText value="#{manageBean.obtainDescription(mail.emailType.description)}"/>   
        		</p:column>		        		
			 </p:dataTable>
			 
			 <p:dataTable var="pho" value="#{user.activeUserPhone}"
									style="padding-top:15px;width:100%" rendered="#{showPhone}" emptyMessage="#{msg.noRecordsFound}">
	 
		        <p:column headerText="#{msg.phone_number}" style="width:30%">  
	            	<h:outputText value="#{pho.number}" />   
	       		</p:column> 
	       		
	       		<p:column headerText="#{msg.phoneType}" style="width:30%">  
	            	<h:outputText value="#{manageBean.obtainDescription(pho.phoneType.description)}"/>   
	       		</p:column>
		    </p:dataTable>
		</ui:composition>
	</h:body>
</html>